<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="tr09" uri="http://www.51i-star.com/news" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/m_member.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/styles.css" />
<title>我的收藏</title>
<script type="text/javascript"src="js/jquery-3.1.0.js"></script>
<script type="text/javascript">
	function dt(id){
		var x=confirm("您确定要删除此商品吗？");
		if(x==true){
			 $.get("DeleteidServlet", {id: id,}, function(){
				 alert("商品删除成功");
				 location.reload();//刷新页面
			 });
		}
	}
</script>
<style type="text/css">
		.c1{
				height: 15px;
				height-line: 15px;
		}
		.c2{
				float:right;	
		}
		.c3{
			color:gray;
			}
		span {
				font-weight: bold;
				font-size: 14px;
				color: blue;
			}

		h5 {
				background-color: #edfafc;
				height: 30px;
				width: 1100px;
				text-align: left;
				padding-top: 10px;
				padding-left: 20px;
				margin-left: 10px;
			}
		td{
				font-size:14px;
				color:#787878;
			}
		table{
				margin-left:10px;
		}
		.pager{
		text-align: right;
		padding: 10px;
		background: white;
		font-size:12px;
	}
	
	.pager a{
		text-decoration: none;
		color: gray;
	}
	
	.pager span{
		font-size: 12px;
		color: gray;
	}
</style>
</head>
<body>
	<h5 class="m7">
		<span>我的收藏</span>
	</h5>
	<div class="c1"></div>
	<table width="100%" border="0" cellpadding="5" cellspacing="1"
		bgcolor="#dddddd">
		<tr align="center">
			<th width="35%" bgcolor="#ffffff">商品名称</th>
			<th width="30%" bgcolor="#ffffff">价格</th>
			<th width="35%" bgcolor="#ffffff">操作</th>
		</tr>
		<c:forEach items="${list}" var="c">
		<tr align="center">
			<td width="35%" bgcolor="#ffffff">${c.productName }</td>
			<td width="30%" bgcolor="#ffffff">${c.productPrice }</td>
			<td width="35%" bgcolor="#ffffff"><a onclick="dt(${c.productId})" Style="cursor: pointer;">删除</a></td>
		</tr>
		</c:forEach>
	</table>
		<div class="pager">
		<tr09:pager url="CollectionServlet" pagesize="5" 
			total="${total}" curpage="${param.curpage}"/>
	</div>


	
</body>
</html>